Trials can help you become better—no matter what their cause—if you use them to grow spiritually.
Your conscience will let you know if you're heading down the wrong path. If you feel bad about something you've done, pray to Heavenly Father and ask for His forgiveness. Try to fix whatever problems you've caused. You might also seek counsel from your parents and priesthood leaders. These steps will help you feel better and get you going in the right direction.
Trials that are not the result of sin can also help you become better. These kinds of trials can test your faith or patience or can teach you about yourself. To use these trials for your growth, ask yourself what you can learn from them and what you can do better.
Your faith can be strengthened during trials if you ask for Heavenly Father's help. As the Savior did when He was suffering, you can pray "more earnestly" (see Mosiah 24:14–15).